package com.sysu.ooad.dto;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.sysu.ooad.entity.Homework;
import com.sysu.ooad.entity.Task;

public class TaskFacade {
	private Task task;
	private List<HomeworkFacade> homeworks = new ArrayList<HomeworkFacade>();
	
	public TaskFacade() {
	}
	public TaskFacade(Task task) {
		this.task = task;
	}
	public Integer getId() {
		return task.getId();
	}
	public String getTitle() {
		return task.getTitle();
	}
	public String getRequirement() {
		return task.getRequirement();
	}
	public Date getDeadline() {
		return task.getDeadline();
	}
	public Date getPublishTime() {
		return task.getPublishTime();
	}
	public void addHomework(Homework homework) {
		homeworks.add(new HomeworkFacade(homework));
	}
	public List<HomeworkFacade> getHomeworks() {
		return homeworks;
	}
}
